#ifndef DATACOLLECTOR_H
#define DATACOLLECTOR_H

#include <QString>
#include <QStringList>
#include <QDirIterator>
#include <QFileInfo>
#include <QDir>
#include <QThread>
#include <QDebug>

class DataCollector : public QThread
{
    Q_OBJECT
public:

    ///
    /// @param  dir         The directory to look for the files
    /// @param  parent      The parent object for QThread
    ///
    /// Constructor to initialize the DataCollector
    explicit DataCollector(const QDir &dir, QObject *parent = 0);

    ///
    /// Starts to collect the data thread based
    void run();

signals:
    void fileCountChanged(int);

private:
    QDirIterator iterator_;         ///< The directory iterator
    QStringList fileList_;          ///< Temporary file list
};

#endif // DATACOLLECTOR_H
